<template>
	<view>
		我的
		<p>
		    <span>经验条：</span>
		    <meter min="0" max="500" value="340" >350 degrees</meter>
		</p>
<p>
    <label for="file">完成度：</label>
    <progress max="100" value="70"> 70% </progress>
</p>
<button @click="test">加数据</button>
{{mobanlist}}
<el-input v-model="mobanlist[0].groups[0].miniGroups.groupid"></el-input>
<!-- <el-calendar v-model="value" /> -->
<el-button @click="addmoban">添加数据</el-button>
<el-button @click="delemoban">删除数据</el-button>
 <el-calendar>
    <template #date-cell="{ data }">
      <p :class="data.isSelected ? 'is-selected' : ''">
        {{ data.day.split('-').slice(1).join('-') }}
		   
        {{ data.isSelected ? '签到' : '' }}
      </p>
    </template>
  </el-calendar>
	</view>
</template>

<script>
	import { reactive } from 'vue'
	export default {
		data() {
			return {
				mobanlist:reactive([
					{
						userid:'1',
						mouldid:'2',
						
						groups:[
							{
								miniGroups:
									{
										number:'1',
										id:'1',
										status:'1',
										restspan:'1',
										groupid:'1',
										order:'1',
										span:'1',
										weight:'1',
									}
								,
								order:'12'
							},
							]}])
						,
						addshuju:{
    createtime: {
        year: 95,
        minutes: 8,
        hours: 44,
        time: 1270001501088,
        date: 20031123,
        seconds: 68,
        month: 52
    },
    mouldid: 66,
    mouldname: "叫是结",
    userid: 1,
    status: 0,
    groups: [
        {
            restspan: 64,
            actid: 1,
            id: 1,
            name: "政连铁算样",
            miniGroups: [
                {
                    number: 36,
                    order: 77,
                    id: 1,
                    restspan: 77,
                    groupid: 96,
                    status: 0,
                    span: 80,
                  weight: 47
                },
                {
                    number: 85,
                    restspan: 5,
                    order: 76,
                    id: 3,
                    weight: 82,
                    status: 0,
                    groupid: 24,
                    span: 11
                },
              
            ],
            point: "et minim",
            status: 0,
            order: 1
        }
    ]
},
						exapleminiGroups:
								{
										number:'1',
										id:'1',
										status:'2',
										restspan:'2',
										groupid:'2',
										order:'2',
										span:'2',
										weight:'2',
									},
					
				
			}
		},
		methods: {
			test(){
			this.mobanlist[0].groups[1]=this.exapleminiGroups
			},
			addmoban(){
				const shuju=this.addshuju
				uni.request({
					url:'http://localhost:8080/mould/add',
					method:'POST',
					data:{
					  shuju
					},
						 header:{'content-type':'application/json'},
						 success: (res) => {
						
						  console.log(res.data)
						 }
				})
			},
			delemoban(){
				uni.request({
					url:'http://localhost:8080/mould/delete',
					method:'POST',
					data:{
						id:28,
					},
					header:{'content-type':'application/x-www-form-urlencoded'},
					success: (res) => {				
					 console.log(res.data)
					}
				})
			}
		}
	}
</script>

<style>

</style>
